package com.ssy.lingxi.after.sale.model.constant;

import com.ssy.lingxi.common.language.LanguageHolder;

/**
 * 配送方式
 * @author 伍将
 * @date 2020/9/16
 * @version 2.0.0
 */
public enum DeliveryTypeEnum {

    /**
     * 物流
     */
    LOGISTICS(1, "物流"),
    /**
     * 自提
     */
    PICK_UP_ADDRESS(2, "自提"),
    /**
     * 无需配送
     */
    NO_DELIVERY(3, "无需配送");

    private final Integer code;
    private final String message;

    DeliveryTypeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return LanguageHolder.getName(this.getDeclaringClass(), this.getCode());
    }
}
